FROM lmsysorg/sglang:v0.4.6.post3-cu124

ARG BASEDIR=/environment

WORKDIR /root
RUN rm -fr /sgl-workspace /workspace

RUN mkdir $BASEDIR
COPY ace $BASEDIR/ace
RUN python3 -m pip install pyarmor==9.0.7  \
    && cd $BASEDIR/ace/python && chmod +x ./encrypt.sh && ./encrypt.sh \
    && cd $BASEDIR/ace \
    && pip install -e "python[all]" -i https://mirrors.aliyun.com/pypi/simple \
    # && python3 -m pip install nvidia-nccl-cu12==2.26.2.post1 --force-reinstall --no-deps  \
    && pip install vllm==0.8.5 -i https://mirrors.aliyun.com/pypi/simple --resume-retries 5\
    && rm -rf ~/.cache/ \
    &&  apt-get autoclean  && apt-get clean && apt-get autoremove --purge \
    && rm -f $BASEDIR/ace/python/encrypt.sh

ENV DEBIAN_FRONTEND=interactive
